from django.db import models


class Group(models.Model):
    groupname = models.CharField(verbose_name='小组名', max_length=200)
    url =  models.URLField(verbose_name='链接')
    enabled = models.BooleanField(verbose_name='是否生效', default=True)

    class Meta:
        verbose_name = verbose_name_plural = '小组'

    def __str__(self):
        return self.groupname


class Post(models.Model):
    title = models.CharField('标题', max_length=200)
    author = models.CharField('作者', max_length=50)


    class Meta:
        verbose_name = verbose_name_plural = '帖子'

    def __str__(self):
        return self.title